<template>
  <!-- 登入人既录入人 - 行政应诉 -->
  <iframe v-if="iframeUrl" id="respondtIframe" :src="iframeUrl" width="100%"  height="850vh" scrolling="yes" frameborder="0" />
</template>

<script>
const SFNET_URL = process.env.VUE_APP_SFNET_URL
import { SFNET_APPKEY, SFNET_SECRETKEY } from '@/store/mutation-types'
import storage from 'store'
import { APP_USER, ACCESS_TOKEN } from '@/store/mutation-types.js'
export default {
  data() {
    return {
      applyid: this.$route.params.applyid,
      matid: this.$route.params.matid,
      pattern: this.$route.params.pattern,
      sfnet_appKey: SFNET_APPKEY,
      sfnet_secretKey: SFNET_SECRETKEY,
      currentUser: storage.get(APP_USER), // 登录人信息
      iframeUrl: null,
    }
  },
  created() {
    try{
      if(this.$route.query.url == '/RespondRecordCaselist'){
        localStorage.setItem('RespondRecordCaselist',JSON.stringify(this.$route.query.queryParam))
        console.log('this.$route.query.RespondRecordCaselist',this.$route.query.queryParam);
      }
    }catch{
      console.log('路由传参非json格式')
    }
	
    const token = storage.get(ACCESS_TOKEN)
    // console.log('this.$route.params', this.$route.params)
    this.iframeUrl = `${SFNET_URL}/approveApplyForm/${this.applyid}/${this.matid}/${this.pattern}/${this.currentUser.userId}/${SFNET_APPKEY}/${SFNET_SECRETKEY}/${token}`
    console.log('iframeUrl', this.iframeUrl)
    // console.log('currentUser', this.currentUser)
  },
  methods: {},
}
</script>

<style  scoped>
</style>